<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'estate')}"/>
    <title>贷款区域分析</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    </style>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>贷款区域分析</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                %{--<a href="index" class="pe-7s-back fa-2x">&nbsp;&nbsp;</a>--}%
                贷款区域分析
            </h2>
        </div>
    </div>
</div>
<div class="content animate-panel">
    <div class="row">

        <div class="hpanel hblue">
            <div class="panel-heading">
                <div class="panel-tools">
                    <button class="btn btn-primary btn-xs" id="searchData" type="submit" onclick = "text1()"><i class="fa fa-search"></i>查询</button>
                    <button class="btn btn-warning2 btn-xs" type="button" id="resetBtn">
                        <i class="fa fa-times"></i>重置</button>
                </div>
                查询
            </div>

        <div class="panel-body seach-group" id="bug1">
            %{--第一行--}%
            <g:form method="POST" action="searchEstate" class="form-horizontal" role="form">
                <div class="row">
                    <div class="form-group col-sm-3">
                        <label for="city" class="col-sm-4 control-label">城市</label>
                        <div class="col-sm-8">
                            <g:select class="form-control" name="city" id="city"
                                      from="${com.cindata.City.executeQuery("select distinct e.city as city from  Estate e where e.city.id <> 1660")}"
                                      valueMessagePrefix="status" optionKey="zoneNumber" optionValue="name"
                                      value="${params?.city}"
                                      noSelection="${["-1": '请选择城市']}"/>
                        </div>
                    </div>

                    <div class="form-group col-sm-5">
                        <label for="city" class="col-sm-3 control-label">贷款金额范围</label>
                        <div class="col-sm-7 input-group ">
                            <input type="text" class=" form-control " placeholder="请输入下限" maxlength="6"
                                   id="loansAmountStart" value="${params?.loansAmountStart}" name="loansAmountStart" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class=" form-control " placeholder="请输入上限" maxlength="6"
                                   id="loansAmountEnd" value="${params?.loansAmountEnd}" name="loansAmountEnd" />
                        </div>
                        <div class="col-sm-2 p-t-xss">
                            万元
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label for="city" class="col-sm-3 control-label">放款时间</label>
                        <div class="col-sm-9 input-daterange input-group p-r-n"  id="datepicker" style="width: 68%;">
                            <input type="text" class=" form-control " placeholder="请选择放款时间"
                                   value="${params?.startDateStart}" name="startDateStart" id="startDateStart" style="text-align: left" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class=" form-control " placeholder="请选择结束时间"
                                   value="${params?.startDateEnd}" name="startDateEnd" id="startDateEnd" style="text-align: left" />
                        </div>
                    </div>
                </div>
            %{--第二行--}%
                <div class="row">
                    <div class="form-group col-sm-3">
                        <label class="col-sm-4 control-label" for="noSearch">贷款时长</label>
                        <div class="col-sm-8">
                            <g:select class="form-control" name="loansDuration" id="loansDuration"
                                      from="${com.cindata.dimension.YearLimitDimension.list()}"
                                      valueMessagePrefix="status" optionKey="label" optionValue="label"
                                      value="${params?.loansDuration}"
                                      noSelection="${["": '请选择贷款时长']}"/>
                        </div>
                    </div>


                    <div class="form-group col-sm-5">
                        <label for="city" class="col-sm-3 control-label">贷款余额范围</label>
                        <div class="col-sm-7  input-group">
                            <input type="text" class=" form-control "
                                   placeholder="请输入下限" id="loansBalanceStart" maxlength="6"
                                   value="${params?.loansBalanceStart}" name="loansBalanceStart" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class="form-control " placeholder="请输入上限" maxlength="6"
                                   id="loansBalanceEnd"  value="${params?.loansBalanceEnd}" name="loansBalanceEnd" />
                        </div>
                        <div class="col-sm-2 p-t-xss">
                            万元
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label for="city" class="col-sm-3 control-label">贷款到期日</label>
                        <div class="col-sm-9 input-daterange input-group p-r-n"  id="datepicker2" style="width: 68%;">
                            <input type="text" class=" form-control " placeholder="请选择贷款时间"
                                   value="${params?.startDateStart}" name="startDateStart" id="endDateStart" style="text-align: left" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class=" form-control " placeholder="请选择贷款时间"
                                   value="${params?.startDateEnd}" name="startDateEnd" id="endDateEnd" style="text-align: left" />
                        </div>
                    </div>
                </div>
            %{--第三行--}%
                <div class="row">
                    %{--<div class="form-group col-sm-3">--}%
                        %{--<label class="col-sm-4 control-label" >剩余还款时长</label>--}%
                        %{--<div class="col-sm-8">--}%
                            %{--<g:select class="form-control" name="remainTime" id="remainTime"--}%
                                      %{--from="${com.cindata.dimension.YearLimitDimension.list()}"--}%
                                      %{--valueMessagePrefix="status" optionKey="label" optionValue="label"--}%
                                      %{--value="${params?.remainTime}"--}%
                                      %{--noSelection="${["": '请选择剩余还款时长']}"/>--}%
                        %{--</div>--}%
                    %{--</div>--}%
                    <div class="form-group col-sm-3">
                        <label class="col-sm-4 control-label" >反欺诈</label>
                        <div class="col-sm-8">
                            <g:select class="form-control" name="isAntiFraud" id="isAntiFraud"
                                      from="${[[name: '命中', value: true], [name: '未命中', value: false]]}" optionKey="value" optionValue="name" value="${params?.isAntiFraud}" noSelection="${["": '请选择反欺诈']}"/>
                        </div>
                    </div>

                    
                </div>
                </div>
            </g:form>
        </div>
    </div>

<div class="row">
    <div class="hpanel hgreen">
        <div class="panel-heading">
            <div class="panel-tools">
                <a class="showhide"><i class="fa fa-chevron-up"></i></a>
            </div>
            观测指标
        </div>
        <div class="panel-body">

            <ul id="myTab" class="nav nav-tabs">
                <li id="one" class="active">
                    <a href="" data-toggle="tab"  href="#tab-1" aria-expanded="true">
                        数量
                    </a>
                </li>
                <li id="two"><a href="" data-toggle="tab"  href="#tab-1" aria-expanded="true">贷款额</a></li>
                <li id="three">
                    <a href=""  data-toggle="tab"  href="#tab-1" aria-expanded="true">
                        贷款余额
                    </a>
                </li>
                <li id="four">
                    <a href=""  data-toggle="tab"  href="#tab-1" aria-expanded="true">
                        命中反欺诈
                    </a>
                </li>
            </ul>
                    <div id="myChart4" style="width: 100%;height: 380px;"></div>
        </div>
    </div>
</div>
    <g:javascript>
        $(function () {

            $("#resetBtn").click(function () {
                $("#fullName").val("");
            })

            $('#datepicker').datepicker({
                language: 'zh-CN'
            });
            $('#datepicker2').datepicker({
                language: 'zh-CN'
            });
            $("#datepicker").on("changeDate", function(event) {
                $("#my_hidden_input").val(
                        $("#datepicker").datepicker('getFormattedDate')
                )
            });

            // $('#esateTable').footable();

            $('.input-group.date').datepicker({ });
            $('.input-daterange').datepicker({ });

        });
        //重置按钮
        $("#resetBtn").click(function () {
            $("#s2id_city span:first").html("请选择城市");
            $("#city").val("");
            $("#loansAmountStart").val("");
            $("#loansAmountEnd").val("");
            $("#loansBalanceStart").val("");
            $("#loansBalanceEnd").val("");
            $("#sourceAddress").val("");
            $("#startDateEnd").val("");
            $("#startDateStart").val("");
            $("#s2id_loansDuration span:first").html("请选择贷款时长");
            $("#loansDuration").val("");
            $("#s2id_risk span:first").html("请选择押品风险");
            $("#risk").val("");
            $("#dynamicMortgageRateStart").val("");
            $("#dynamicMortgageRateEnd").val("");
            $("#endDateStart").val("");
            $("#endDateEnd").val("");
            $("#buildAreaStart").val("");
            $("#buildAreaEnd").val("");
        })

    </g:javascript>
<asset:javascript src="echarts/echarts-all-3.js" />
<asset:javascript src="analyze/echartsCommon1.js" />
</body>
</html>
